package com.jumi.microservice.material.service;

import com.jumi.microservice.material.domain.JmWarehouse;
import com.jumi.microservice.material.dto.warehouse.JmWarehouseRequest;
import com.jumi.microservice.material.dto.warehouse.JmWarehouseResponse;

import java.util.List;
import java.util.Map;

/**
 * @author ssk
 * @create 2020/7/20 16:22
 **/
public interface JmWarehouseService {

    /**
     * 保存方法
     *
     * @param jmWarehouse
     * @return
     */
    int save(JmWarehouse jmWarehouse);

    /**
     * 更新方法
     *
     * @param jmWarehouse
     * @return
     */
    int update(JmWarehouse jmWarehouse);

    /**
     * 根据id查询实体类
     *
     * @param warehouseId
     * @return
     */
    JmWarehouseResponse findById(Long warehouseId);

    /**
     * 根据条件查询实体类集合
     *
     * @param jmWarehouse
     * @return
     */
    List<JmWarehouseResponse> findAll(JmWarehouseRequest jmWarehouse);

    /**
     * @Description: 查询仓库列表
     * @Param categoryIds
     * @Return {@link List<  JmWarehouseResponse >}
     * @Throws
     * @Author Abel Yang
     * @Date 2020/8/20/020 14:00
     */
    List<JmWarehouseResponse> getWarehouseList();


    List<Map<String,Object>> findArea(Integer deep,Long parentId);

    /**
     * @Description: 根据仓库名称返回仓库id值
     * @Author zhangy
     * @Param: warehouseName
     * @Return: warehouseId
     */
    Integer getWarehouseIdByWarehouseName(String warehouseName);


    /**
     * 根据仓库id返回仓库名称.
     * @param warehouseId
     * @Author zhangy
     */
    String getWarehouseNameByWarehouseId(Integer warehouseId);
}
